<ul class="sub_nav">
<% @category.vails.each do |vail| %>
	<li class="link"><%= link_to vail.name, path_for_vail(vail) %></li>
	<% unless @category.vails.find(:all).index(vail) == @category.vails.find(:all).length - 1 %>
		<li class="divider">|</li>
	<% end %>
<% end %>
</ul>

<div id="mini_right">
	<h1><%= @category.name %></h1>
</div>
<div id="mini_left">
	<% unless @category.graphic.nil? %>
		<%= image_tag @category.graphic.public_filename(:thumb) %>
	<% end %>
</div>

<div class="text_area"><%= @category.body %></div>

<div id="datasheet">
	<% @category.datasheets.each do |datasheet| %>
		<div class="datasheet_link">
			<div class="download_link">
				Download the <%= link_to datasheet.name, datasheet.public_filename %> datasheet.
			</div>
			<div class="download_icon">
				<%= link_to image_tag("/images/downLoad_30x30.png"), datasheet.public_filename %>
			</div>
		</div>
	<% end %>
</div>

<% if logged_in? %>
<%= render :partial => 'shared/version', :locals => { :versioned => @category } %>
<br/>
<ul class="right">
	<%= render :partial => 'shared/upload_delete_graphic', :locals => { :graphicable_resource => @category } %>
	<li class="horizontal"><%= link_to "Upload Datasheet", new_datasheet_path(:controller_type => params[:controller], :id => @category) %></li>
	<li class="horizontal">|</li>
	<li class="horizontal"><%= link_to "Edit", edit_category_path(@category) %></li>
</ul>
<% end %>

<br/>
<div id="small_buttons_container", style="width:<%= get_small_buttons_container_width(@category.vails) %>px;">
	<% @category.vails.each do |vail| %>
	<div class="small_button">
		<div class="icon">
			<% unless vail.graphic.nil? %>
				<%= link_to image_tag(vail.graphic.public_filename(:medium)), vail_path(vail) %>
			<% end %>
		</div>
		<h2><%= link_to vail.name, path_for_vail(vail) %></h2>
	</div>
	<% end %>
</div>

<div id="clear"></div>